/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.Provisioning;
/*    */ import com.zimbra.cs.account.UCService;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.cs.account.accesscontrol.Rights.Admin;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class GetAllUCServices
/*    */   extends AdminDocumentHandler
/*    */ {
/*    */   public static final String BY_NAME = "name";
/*    */   public static final String BY_ID = "id";
/*    */   
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 42 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/* 43 */     Provisioning prov = Provisioning.getInstance();
/*    */     
/* 45 */     List<UCService> ucServices = prov.getAllUCServices();
/*    */     
/* 47 */     AdminAccessControl aac = AdminAccessControl.getAdminAccessControl(zsc);
/*    */     
/* 49 */     Element response = zsc.createElement(AdminConstants.GET_ALL_UC_SERVICES_RESPONSE);
/* 50 */     for (UCService ucSservice : ucServices) {
/* 51 */       if (aac.hasRightsToList(ucSservice, Rights.Admin.R_listUCService, null)) {
/* 52 */         GetUCService.encodeUCService(response, ucSservice, null, aac.getAttrRightChecker(ucSservice));
/*    */       }
/*    */     }
/*    */     
/* 56 */     return response;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 61 */     relatedRights.add(Rights.Admin.R_listUCService);
/* 62 */     relatedRights.add(Rights.Admin.R_getUCService);
/*    */     
/* 64 */     notes.add("If the authenticated admin does not have the corresponding list{Entry} right for an entry, the entry is skipped in the getAllXXX/searchXXX/searchDirectoryResponse,  no PERM_DENIED exception will be thrown. Attributes that are not allowed to be get by the authenticated admin will be returned as <a n=\"{attr-name}\" pd=\"1\"/>.");
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/GetAllUCServices.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */